#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package};

import java.util.Vector;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;

import com.vordel.client.manager.Images;
import com.vordel.client.manager.filter.DefaultGUIFilter;
import com.vordel.client.manager.wizard.VordelPage;

/**
 * Filter configuration GUI for 'Simple' example filter.
 * This class shows how to code ${artifactId} text fields for configuring a
 * custom filter.
 */
public class FilterUI 
    extends DefaultGUIFilter 
{
    /**
     * Add the pages we want to show in the configuration wizard for the filter.
     */
    public Vector<VordelPage> getPropertyPages() {
        Vector<VordelPage> pages = new Vector<VordelPage>();
        
        // Add the panel for configuring the specific fields
        pages.add(new FilterPage());
        
        // Add the page which allows the user to set the log strings for the 
        // audit trail, for the pass/fail/error cases
        pages.add(createLogPage());
        
        return pages;
    }
    
    /**
     * Set the categories in which we want to display this Filter. The 
     * categories define the sections of the palette in which the Filter will
     * appear. The values returned should be the localized name of the palette
     * section, so ensure that the property is defined in the 
     * resources.properties in this class' package.<br>
     * <br>
     * Groups available by default are (pre-localized):
     * <ul>
     * <li>FILTER_GROUP_ALERT
     * <li>FILTER_GROUP_ATTRIBUTE
     * <li>FILTER_GROUP_AUTHENTICATION
     * <li>FILTER_GROUP_AUTHORIZATION
     * <li>FILTER_GROUP_CERTIFICATE
     * <li>FILTER_GROUP_CIRCUIT
     * <li>FILTER_GROUP_CONTENT_FILTERING
     * <li>FILTER_GROUP_CONVERSION
     * <li>FILTER_GROUP_ENCRYPTION
     * <li>FILTER_GROUP_ESSOAP
     * <li>FILTER_GROUP_JAVASCRIPT
     * <li>FILTER_GROUP_JMS
     * <li>FILTER_GROUP_LOG
     * <li>FILTER_GROUP_MAX_MESSAGES
     * <li>FILTER_GROUP_PARSER
     * <li>FILTER_GROUP_RESOLVER
     * <li>FILTER_GROUP_SIGNATURE
     * <li>FILTER_GROUP_UTIL
     * <li>FILTER_GROUP_UTILITY
     * <li>FILTER_GROUP_VIRUS
     * <li>FILTER_GROUP_WEBSERVICE
     * </ul>
     */
    public String[] getCategories() {
    	
    	return new String [] {"Vordel Incubator"};
    }
    
    

	@Override
	public String getFriendlyName(String arg0) {
		// TODO Auto-generated method stub
    	
		return "${artifactId} Filter";
    	
	}

	

	@Override
	public String getTypeName() {
		// TODO Auto-generated method stub
		return "${artifactId} Filter";
	}

	

	/*
     *  Register our custom images with the image registry
     */
    private static final String IMAGE_KEY = FilterUI.class.getName();
    static {
        Images.getImageRegistry().put(IMAGE_KEY, Images.createDescriptor(FilterUI.class, "filter.gif"));
    }
    
    /**
     *  The icon image needs to be added in images.properties in com.vordel.client.manager
     *  the id used there is used as a reference here.
     *  Use this method to get image id for the small icon image in Images.get(id), etc.
     */
    public String getSmallIconId() {
        return IMAGE_KEY;
    }
    
    /**
     * Implement this method if you want to display a non-default image
     * for your filter in the circuit editor canvas and navigation tree.
     */
    public Image getSmallImage() {
        return Images.get(IMAGE_KEY);
    }
    
    /**
     * Implement this method to display a non-default icon for your filter in 
     * the palette.
     */
    public ImageDescriptor getSmallIcon() {
        return Images.getImageDescriptor(IMAGE_KEY);
    }
}
